//
//  HotModel.m
//  0000327App
//
//  Created by user on 16/3/27.
//  Copyright © 2016年 MoreMoney. All rights reserved.
//

#import "XBUserModel.h"

@interface XBUserModel ()

@end

static NSMutableArray *dataArray;

@implementation XBUserModel

+ (instancetype)modelName:(NSString *)name imageUrl:(NSString *)url
{
    XBUserModel *model = [[self alloc] init];
    model.name = name;
    model.imageUrl = url;
    return model;
}

+ (NSArray *)models
{
    dataArray = [NSMutableArray array];
    
    [self loadData];
    
    return dataArray;
}

+ (void)loadData
{
    [self addModelWithName:@"用户0" imageURL:@"http://image1.xunbaozl.com/Fh1tYhn7eaw_63rajXJvRHquNore?imageMogr2/thumbnail/300/90!"];
    [self addModelWithName:@"用户1" imageURL:@"http://image1.xunbaozl.com/FmC-wvB8QYbyNTMRKyhmswcsTpHg?imageMogr2/thumbnail/300/90!"];
    [self addModelWithName:@"用户2" imageURL:@"http://image1.xunbaozl.com/Fo6QRLpjiJaRMy9VQNsqJAqa4pQY?imageMogr2/thumbnail/300/90!"];
    [self addModelWithName:@"用户5" imageURL:@"http://image1.xunbaozl.com/FjM2_TT2WQdsJ_dJ1GhgZEeRS97O?imageMogr2/thumbnail/300/90!"];
    [self addModelWithName:@"用户6" imageURL:@"http://image1.xunbaozl.com/FmC-wvB8QYbyNTMRKyhmswcsTpHg?imageMogr2/thumbnail/300/90!"];
    [self addModelWithName:@"用户7" imageURL:@"http://image1.xunbaozl.com/FjM2_TT2WQdsJ_dJ1GhgZEeRS97O?imageMogr2/thumbnail/300/90!"];
    [self addModelWithName:@"用户8" imageURL:@"http://image1.xunbaozl.com/Fh1tYhn7eaw_63rajXJvRHquNore?imageMogr2/thumbnail/300/90!"];
    [self addModelWithName:@"用户9" imageURL:@"http://image1.xunbaozl.com/Fo6QRLpjiJaRMy9VQNsqJAqa4pQY?imageMogr2/thumbnail/300/90!"];
    
}

+ (void)addModelWithName:(NSString *)name imageURL:(NSString *)url
{
    XBUserModel *model = [XBUserModel modelName:name imageUrl:url];
    [dataArray addObject:model];
}

@end
